function Shot( ent, inflictor, attacker, amount, dmginfo )
    if ent:IsPlayer() then
        if ent:LastHitGroup() == 6 or ent:LastHitGroup() == 7 && ( SERVER ) && dmginfo:GetDamage() > 5 && ent:GetVar("Legs") == "Fine"  then
            ent:PrintMessage(HUD_PRINTCENTER, "You have been hurt!")
            ent:SetVar("Legs", "Broken")
            GAMEMODE:SetPlayerSpeed(ent, 100, 100)
            timer.Simple(dmginfo:GetDamage()*0.2+math.random(10,30), function()
                if ent:GetVar("Legs") == "Broken" then
                    GAMEMODE:SetPlayerSpeed(ent, 220, 300)
                    ent:SetVar("Legs", "Fine")    
                end        
            end)
        end
    end
end
hook.Add("EntityTakeDamage", "Break", Shot)


